package com.nyist.controller;

import com.nyist.result.CommonResult;
import com.nyist.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class OpenFeginController {

    @Resource
    UserService service;

    @GetMapping(value = "/consumer/test/{name}")
    public CommonResult test(@PathVariable("name") String name) {
        System.out.println("进入消费者：openfegin 进行消费");
        return service.hello(name);
    }


    @GetMapping(value = "/consumer/timeout")
    public String timeOut() {
        System.out.println("进入消费者：openfegin 超时测试");
        return service.getOpenFeginTimeOut();
    }
}
